home *** CD-ROM | disk | FTP | other *** search
- <?xml version="1.0"?>
-
- <?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
- <?xml-stylesheet href="chrome://sqlitemanager/skin/sqlitemanager.css" type="text/css"?>
- <?xml-stylesheet href="chrome://sqlitemanager/skin/dynaTreeDataTable.css" type="text/css"?>
-
- <?xul-overlay href="chrome://sqlitemanager/content/menuSqlHelper.xul"?>
- <?xul-overlay href="chrome://sqlitemanager/content/tabDbInfo.xul"?>
- <?xul-overlay href="chrome://sqlitemanager/content/exim.xul"?>
- <?xul-overlay href="chrome://sqlitemanager/content/udf.xul"?>
-
- <!DOCTYPE window SYSTEM "chrome://sqlitemanager/locale/sqlitemanager.dtd">
-
- <window id="sqlitemanager-window" title="&window.title;"
- persist="screenX screenY width height sizemode"
- orient="vertical"
- onload="SQLiteManager.Startup()"
- onunload="SQLiteManager.Shutdown()"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- xmlns:html="http://www.w3.org/1999/xhtml">
-
- <!-- Icon from chrome -->
- <!-- without div, there is error -->
- <html:div>
- <html:link rel="icon" href="chrome://sqlitemanager/skin/images/default16.png"/>
- </html:div>
-
- <script type="application/x-javascript" src="globals.js"/>
- <script type="application/x-javascript" src="tokenize.js"/>
- <script type="application/x-javascript" src="treeDataTable.js"/>
- <script type="application/x-javascript" src="treeDbStructure.js"/>
- <script type="application/x-javascript" src="exim.js"/>
- <script type="application/x-javascript" src="udf.js"/>
- <script type="application/x-javascript" src="createManager.js"/>
- <script type="application/x-javascript" src="sqlitemanager.js"/>
- <script type="application/x-javascript" src="extManager.js"/>
-
- <commandset id="sm-cmdset">
- <command id="smc-newDb" oncommand="SQLiteManager.newDatabase()" tooltiptext="&menu.db.new;"/>
- <command id="smc-openDb" oncommand="SQLiteManager.openDatabase()" tooltiptext="&menu.db.connect;"/>
- <command id="smc-import" oncommand="SQLiteManager.importFromFile()" tooltiptext="&import;" observes="bc-dbOpen"/>
- <command id="smc-udf" oncommand="SQLiteManager.openUdfTab()" tooltiptext="User-defined functions"/>
-
- <!-- commands for tables -->
- <command id="smc-createTable" oncommand="SQLiteManager.createTable()" tooltiptext="&createTable;" observes="bc-dbOpen"/>
- <command id="smc-dropTable" oncommand="SQLiteManager.operateOnTable('drop')" tooltiptext="&dropTable;" observes="bc-dbOpen"/>
- <command id="smc-modifyTable" hidden="true" oncommand="SQLiteManager.operateOnTable('modify')" tooltiptext="&modifyTable;" observes="bc-dbOpen"/>
- <command id="smc-emptyTable" oncommand="SQLiteManager.operateOnTable('empty')" tooltiptext="&emptyTable;" observes="bc-dbOpen"/>
- <command id="smc-renameTable" oncommand="SQLiteManager.operateOnTable('rename')" tooltiptext="&renameTable;" observes="bc-dbOpen"/>
- <command id="smc-copyTable" oncommand="SQLiteManager.operateOnTable('copy')" tooltiptext="©Table;" observes="bc-dbOpen"/>
- <command id="smc-exportTable" oncommand="SQLiteManager.exportObject('table')" tooltiptext="&exportTable;" observes="bc-dbOpen"/>
- <command id="smc-reindexTable" oncommand="SQLiteManager.operateOnTable('reindex')" tooltiptext="&reindexTable;" observes="bc-dbOpen"/>
-
- <!-- commands for views -->
- <command id="smc-createView" oncommand="SQLiteManager.createObject('view')" tooltiptext="&createView;" observes="bc-dbOpen"/>
- <command id="smc-dropView" oncommand="SQLiteManager.dropObject('view')" tooltiptext="&dropView;" observes="bc-dbOpen"/>
- <command id="smc-renameView" oncommand="SQLiteManager.renameObject('view')" tooltiptext="&renameView;" observes="bc-dbOpen"/>
- <command id="smc-modifyView" oncommand="SQLiteManager.modifyView()" tooltiptext="&modifyView;" observes="bc-dbOpen"/>
- <command id="smc-exportView" oncommand="SQLiteManager.exportObject('view')" tooltiptext="&exportView;" observes="bc-dbOpen"/>
-
- <!-- commands for indexes -->
- <command id="smc-createIndex" oncommand="SQLiteManager.createObject('index')" tooltiptext="&createIndex;" observes="bc-dbOpen"/>
- <command id="smc-dropIndex" oncommand="SQLiteManager.dropObject('index')" tooltiptext="&dropIndex;" observes="bc-dbOpen"/>
- <command id="smc-reindexIndex" oncommand="SQLiteManager.reindexIndex()" tooltiptext="&reindexIndex;" observes="bc-dbOpen"/>
-
- <!-- commands for triggers -->
- <command id="smc-createTrigger" oncommand="SQLiteManager.createObject('trigger')" tooltiptext="&createTrigger;" observes="bc-dbOpen"/>
- <command id="smc-dropTrigger" oncommand="SQLiteManager.dropObject('trigger')" tooltiptext="&dropTrigger;" observes="bc-dbOpen"/>
- <command id="smc-renameTrigger" oncommand="SQLiteManager.renameObject('trigger')" tooltiptext="&renameTrigger;" observes="bc-dbOpen"/>
-
- <!-- commands for search -->
- <command id="smc-search" oncommand="SQLiteManager.search()" tooltiptext="&btn.search;" label="&btn.search;" accesskey="&btn.search.ak;" observes="bc-dbOpen"/>
- <command id="smc-showAll" oncommand="SQLiteManager.showAll()" tooltiptext="&btn.showAll;" label="&btn.showAll;" accesskey="&btn.showAll.ak;" observes="bc-dbOpen"/>
-
- <command id="smc-refresh" oncommand="SQLiteManager.refresh()" tooltiptext="&refreshDirection;" observes="bc-dbOpen"/>
- <command id="smc-options" oncommand="SQLiteManager.openOptionsWindow()" tooltiptext="&mi.options;" accesskey="&mi.options.ak;"/>
- <command id="smc-dominspector" oncommand="SQLiteManager.openDomIWindow()" tooltiptext="Start DOM Inpector"/>
- <command id="smc-aboutconfig" oncommand="SQLiteManager.openAboutConfigWindow()" tooltiptext="&mi.aboutconfig;" accesskey="&mi.aboutconfig.ak;"/>
- <command id="smc-console" oncommand="SQLiteManager.openConsoleWindow()" tooltiptext="&mi.console;" accesskey="&mi.console.ak;"/>
- <command id="smc-selectAllRecords" oncommand="SQLiteManager.selectAllRecords()" tooltiptext="&selectAllRecords;" label="&selectAllRecords;" accesskey="&selectAllRecords.ak;" observes="bc-dbOpen"/>
-
- <!-- for commands under execute tab-->
- <command id="smc-runQuery" oncommand="SQLiteManager.runSqlStatement('select')" />
- </commandset>
-
- <keyset id="smKeyset">
- <key id="refresh-key" modifiers="shift" keycode="VK_F5" command="smc-refresh"/>
- <key id="key-selectAllRecords" modifiers="accel shift" key="A" command="smc-selectAllRecords"/>
- <key id="key-runQuery" modifiers="accel" key=";" command="smc-runQuery"/>
- <key modifiers="control" keycode="VK_F12" command="smc-runQuery"/>
- </keyset>
-
- <!-- hidden because it occupies some space in Songbird -->
- <broadcasterset hidden="true">
- <broadcast id="bc-dbOpen" disabled="true"/>
- </broadcasterset>
-
- <popupset>
- <menupopup id="mp-opTableColumn">
- <menuitem label="&menu.editColumn;" accesskey="&menu.editColumn.ak;" oncommand="SQLiteManager.startEditColumn()"/>
- <menuitem label="&menu.dropColumn;" accesskey="&menu.dropColumn.ak;" oncommand="SQLiteManager.dropColumn()"/>
- </menupopup>
-
- <!-- context menu for tree columns in treeDataTable -->
- <menupopup id="mp-data-treecol">
- <menuitem label="&menu.copyColName;" accesskey="&menu.copyColName.ak;" oncommand="SQLiteManager.copyColumnName(this)"/>
- </menupopup>
-
- <!-- context menu for tree in execute tab -->
- <menupopup id="mp-copy">
- <menuitem label="&menu.copyRows;" accesskey="&menu.copyRows.ak;" oncommand="treeExecute.UserCopyRows('csv')"/>
- <menuitem label="&menu.copyRowsForExcel;" oncommand="treeExecute.UserCopyRows('csv-excel')"/>
- <menuitem label="&menu.copyRowsAsSql;" accesskey="&menu.copyRowsAsSql.ak;" oncommand="treeExecute.UserCopyRows('sql')"/>
- <menuseparator/>
- <menuitem label="&menu.copyCell;" accesskey="&menu.copyCell.ak;" oncommand="treeExecute.UserCopyCell()"/>
- </menupopup>
-
- <!-- context menu for tree in browse tab for master tables & views -->
- <menupopup id="mp-browse-copy">
- <menuitem label="&menu.copyRows;" accesskey="&menu.copyRows.ak;" oncommand="treeBrowse.UserCopyRows('csv')"/>
- <menuitem label="&menu.copyRowsForExcel;" oncommand="treeBrowse.UserCopyRows('csv-excel')"/>
- <menuitem label="&menu.copyRowsAsSql;" accesskey="&menu.copyRowsAsSql.ak;" oncommand="treeBrowse.UserCopyRows('sql')"/>
- <menuseparator/>
- <menuitem label="&menu.copyCell;" accesskey="&menu.copyCell.ak;" oncommand="treeBrowse.UserCopyCell()"/>
- </menupopup>
-
- <!-- context menu for tree in browse tab for other tables -->
- <menupopup id="mp-editTableRow">
- <menuitem label="&menu.editSelected;" accesskey="&menu.editSelected.ak;" oncommand="SQLiteManager.operateOnTable('update')"/>
- <menuitem label="&menu.deleteSelected;" accesskey="&menu.deleteSelected.ak;" oncommand="SQLiteManager.operateOnTable('delete')"/>
- <menuitem label="&menu.duplicateRecord;" accesskey="&menu.duplicateRecord.ak;" oncommand="SQLiteManager.operateOnTable('duplicate')"/>
- <menuseparator/>
- <menuitem label="&menu.copyRows;" accesskey="&menu.copyRows.ak;" oncommand="treeBrowse.UserCopyRows('csv')"/>
- <menuitem label="&menu.copyRowsForExcel;" oncommand="treeBrowse.UserCopyRows('csv-excel')"/>
- <menuitem label="&menu.copyRowsAsSql;" accesskey="&menu.copyRowsAsSql.ak;" oncommand="treeBrowse.UserCopyRows('sql')"/>
- <menuseparator/>
- <menuitem label="&menu.copyCell;" accesskey="&menu.copyCell.ak;" oncommand="treeBrowse.UserCopyCell()"/>
- </menupopup>
-
- <menupopup id="mp-create-table">
- <menuitem label="&createTable;" accesskey="&create.ak;" command="smc-createTable"/>
- </menupopup>
- <menupopup id="mp-create-index">
- <menuitem label="&createIndex;" accesskey="&create.ak;" command="smc-createIndex"/>
- </menupopup>
- <menupopup id="mp-create-view">
- <menuitem label="&createView;" accesskey="&create.ak;" command="smc-createView"/>
- </menupopup>
- <menupopup id="mp-create-trigger">
- <menuitem label="&createTrigger;" accesskey="&create.ak;" command="smc-createTrigger"/>
- </menupopup>
-
- <menupopup id="mp-dbstructure" onpopupshowing="SQLiteManager.setTreeStructureContextMenu();">
- </menupopup>
-
- <menupopup id="mp-detachDb">
- <menuitem label="&menu.db.detach;" oncommand="SQLiteManager.detachDatabase()"/>
- </menupopup>
- </popupset>
-
- <vbox id="hello" flex="1">
- <toolbox id="tb-main">
- <menubar id="sm-menubar">
- <menu id="menu-database" label="&menu.db;" accesskey="&menu.db.ak;">
- <menupopup>
- <menuitem label="&menu.db.new;" accesskey="&menu.db.new.ak;" command="smc-newDb"/>
- <menuitem label="&menu.db.newMemory;" accesskey="&menu.db.newMemory.ak;" oncommand="SQLiteManager.openMemoryDatabase()"/>
- <menuitem label="&menu.db.connect;" accesskey="&menu.db.connect.ak;" command="smc-openDb"/>
- <menuitem id="mi-connect-ads-win" hidden="true" label="&menu.db.connectADS;" oncommand="SQLiteManager.openDatabaseADS()"/>
- <menuitem label="&menu.db.close;" accesskey="&menu.db.close.ak;" oncommand="SQLiteManager.closeDatabase()" observes="bc-dbOpen"/>
- <menu label="&menu.db.mru;" id="menu-mru" accesskey="&menu.db.mru.ak;">
- <menupopup>
- </menupopup>
- </menu>
- <menuseparator/>
- <menuitem label="&menu.db.attach;" accesskey="&menu.db.attach.ak;" oncommand="SQLiteManager.attachDatabase()" observes="bc-dbOpen"/>
- <menuitem label="&menu.db.detach;" accesskey="&menu.db.detach.ak;" oncommand="SQLiteManager.detachDatabase()" observes="bc-dbOpen"/>
- <menuseparator/>
- <menuitem label="&menu.db.copy;" accesskey="&menu.db.copy.ak;" oncommand="SQLiteManager.copyDatabase()" observes="bc-dbOpen"/>
- <menuitem label="&menu.db.compact;" accesskey="&menu.db.compact.ak;" oncommand="SQLiteManager.compactDatabase()" observes="bc-dbOpen"/>
- <menuitem label="&menu.db.analyze;" accesskey="&menu.db.analyze.ak;" oncommand="SQLiteManager.analyzeDatabase()" observes="bc-dbOpen"/>
- <menuitem label="&menu.db.check;" accesskey="&menu.db.check.ak;" oncommand="SQLiteManager.checkIntegrity()" observes="bc-dbOpen"/>
- <menuseparator/>
- <menuitem label="&exportAll;" accesskey="&exportAll.ak;" oncommand="SQLiteManager.exportAll('tables')" observes="bc-dbOpen"/>
- <menuitem label="&exportDb;" accesskey="&exportDb.ak;" oncommand="SQLiteManager.exportAll('db')" observes="bc-dbOpen"/>
- <menuitem label="&exportDbStr;" accesskey="&exportDbStr.ak;" oncommand="SQLiteManager.exportAll('dbstructure')" observes="bc-dbOpen"/>
- <menuitem label="&import;" accesskey="&import.ak;" command="smc-import"/>
- <menuseparator/>
- <menuitem label="&refresh;" accesskey="&refresh.ak;" command="smc-refresh" key="refresh-key"/>
- <menuitem label="&reconnect;" accesskey="&reconnect.ak;" oncommand="SQLiteManager.reconnect()" observes="bc-dbOpen"/>
- <!--
- <menuitem label="Save Database" accesskey="s" disabled="true"/>
- -->
- <menuseparator/>
- <menuitem label="&exit;" accesskey="&exit.ak;" oncommand="window.close()"/>
- </menupopup>
- </menu>
- <!-- menupopups in the next 4 menus have been reused using javascript createMenu function-->
- <menu id="menu-table" label="&menu.table;" accesskey="&menu.table.ak;">
- <menupopup>
- <menuitem label="&createTable;" accesskey="&create.ak;" command="smc-createTable"/>
- <menuitem label="&dropTable;" accesskey="&drop.ak;" command="smc-dropTable"/>
- <menuitem label="&emptyTable;" accesskey="&empty.ak;" command="smc-emptyTable"/>
- <menuseparator/>
- <menuitem label="&renameTable;" accesskey="&rename.ak;" command="smc-renameTable"/>
- <menuitem label="&modifyTable;" accesskey="&modify.ak;" command="smc-modifyTable"/>
- <menuitem label="©Table;" accesskey="©.ak;" command="smc-copyTable"/>
- <menuitem label="&exportTable;" accesskey="&export.ak;" command="smc-exportTable"/>
- <menuseparator/>
- <menuitem label="&reindexTable;" accesskey="&reindex.ak;" command="smc-reindexTable"/>
- <!-- some error: says unknown collation -->
- <!--
- <menuitem label="&analyzeTable;" accesskey="&analyze.ak;" oncommand="SQLiteManager.operateOnTable('analyze')"/>
- -->
- </menupopup>
- </menu>
- <menu id="menu-index" label="&menu.index;" accesskey="&menu.index.ak;">
- <menupopup>
- <menuitem label="&createIndex;" accesskey="&create.ak;" command="smc-createIndex"/>
- <menuitem label="&dropIndex;" accesskey="&drop.ak;" command="smc-dropIndex"/>
- <menuseparator/>
- <menuitem label="&reindexIndex;" accesskey="&reindex.ak;" command="smc-reindexIndex"/>
- </menupopup>
- </menu>
- <menu id="menu-view" label="&menu.view;" accesskey="&menu.view.ak;">
- <menupopup>
- <menuitem label="&createView;" accesskey="&create.ak;" command="smc-createView"/>
- <menuitem label="&dropView;" accesskey="&drop.ak;" command="smc-dropView"/>
- <menuseparator/>
- <menuitem label="&renameView;" accesskey="&rename.ak;" command="smc-renameView"/>
- <menuitem label="&modifyView;" accesskey="&modify.ak;" command="smc-modifyView"/>
- <menuitem label="&exportView;" accesskey="&export.ak;" command="smc-exportView"/>
- </menupopup>
- </menu>
- <menu id="menu-trigger" label="&menu.trigger;" accesskey="&menu.trigger.ak;">
- <menupopup>
- <menuitem label="&createTrigger;" accesskey="&create.ak;" command="smc-createTrigger"/>
- <menuitem label="&dropTrigger;" accesskey="&drop.ak;" command="smc-dropTrigger"/>
- <menuseparator/>
- <menuitem label="&renameTrigger;" accesskey="&rename.ak;" command="smc-renameTrigger"/>
- </menupopup>
- </menu>
- <menu id="menu-tools" label="&menu.tools;" accesskey="&menu.tools.ak;">
- <menupopup id="sm_menu_tools_popup">
- <menuitem label="&mi.options;" accesskey="&mi.options.ak;" command="smc-options"/>
- <!-- Issue #149: default state of the following menuitem should be unchecked -->
- <menuitem id="menu-general-sharedPagerCache" label="&mi.sharedPagerCache;" accesskey="&mi.sharedPagerCache.ak;" type="checkbox"/>
- <menuitem id="menu-general-extensionTable" type="checkbox" label="&mi.extensionTable;" accesskey="&mi.extensionTable.ak;" oncommand="SQLiteManager.useExtensionManagementTable(this.hasAttribute('checked'),false);" observes="bc-dbOpen"/>
-
- <menuitem id="experiment" label="Experiment" oncommand="SQLiteManager.experiment()"/>
- </menupopup>
- </menu>
- <menu id="menu-help" label="&menu.help;">
- <menupopup>
- <menuitem label="&menu.help.reportProblem;" accesskey="&menu.help.reportProblem.ak;" oncommand="SmGlobals.openURL(SmGlobals.webpages.issueNew)"/>
- <menuitem label="&menu.help.faq;" accesskey="&menu.help.faq.ak;" oncommand="SmGlobals.openURL(SmGlobals.webpages.faq)"/>
- <menuseparator/>
- <menuitem label="&menu.help.sqlitehome;" accesskey="&menu.help.sqlitehome.ak;" oncommand="SmGlobals.openURL(SmGlobals.webpages.sqliteHome)"/>
- <menuitem label="&menu.help.sqlitesyntax;" accesskey="&menu.help.sqlitesyntax.ak;" oncommand="SmGlobals.openURL(SmGlobals.webpages.sqliteLang)"/>
- <menuseparator/>
- <menuitem label="&menu.help.extensionhome;" accesskey="&menu.help.extensionhome.ak;" oncommand="SmGlobals.openURL(SmGlobals.webpages.home)"/>
- <menuitem label="&menu.help.aboutextension;" accesskey="&menu.help.aboutextension.ak;" oncommand="window.openDialog(SmGlobals.chromes.aboutSM,'about','chrome, centerscreen, modal, dialog');"/>
- </menupopup>
- </menu>
- <spacer flex="1"/>
- </menubar>
- <!-- this hbox holds all main toolbars. -->
- <hbox id="hbox-main-toolbar">
- <!-- each toolbar must end with a toolbarseparator to allow dynamic arrangement of toolbars without spoiling the display-->
- <toolbar id="sm-toolbar-refresh">
- <toolbarbutton id="tbb_refresh" command="smc-refresh"/>
- <toolbarbutton id="tbb_options" command="smc-options"/>
- <toolbarseparator/>
- </toolbar>
-
- <toolbar id="sm-toolbar-database">
- <toolbarbutton id="tbb_newDb" command="smc-newDb"/>
- <toolbarbutton id="tbb_openDb" command="smc-openDb"/>
- <toolbarbutton id="tbb_import" command="smc-import"/>
- <toolbarbutton id="tbb_udf" command="smc-udf"/>
- <toolbarseparator/>
- </toolbar>
-
- <toolbar id="sm-toolbar-table">
- <toolbarbutton id="tbb_createTable" command="smc-createTable"/>
- <toolbarbutton id="tbb_dropTable" command="smc-dropTable"/>
- <toolbarbutton id="tbb_modifyTable" command="smc-modifyTable"/>
- <toolbarseparator/>
- </toolbar>
- <toolbar id="sm-toolbar-index">
- <toolbarbutton id="tbb_createIndex" command="smc-createIndex"/>
- <toolbarbutton id="tbb_dropIndex" command="smc-dropIndex"/>
- <toolbarseparator/>
- </toolbar>
-
- <toolbar id="sm-toolbar-profileDB">
- <menu id="menu-DbList" label="&dir;" tooltiptext="&dir;">
- <menupopup>
- <menuitem label="&profileDir;" type="radio" name="menu-defaultDir" checked="true" oncommand="SQLiteManager.populateDBList('profile');"/>
- <menuitem label="&userDir;" type="radio" name="menu-defaultDir" oncommand="SQLiteManager.populateDBList('user');"/>
- <menuseparator/>
- <menuitem label="&selectUserDir;" oncommand="SQLiteManager.selectDefaultDir();"/>
- </menupopup>
- </menu>
- <menulist id="listbox-profileDB" style="max-width: 25ex" sizetopopup="always" dirType="profile">
- <menupopup>
- <menuitem label="&profile.dblist.select;" selected="true"/>
- </menupopup>
- </menulist>
- <toolbarbutton label="&profile.dblist.buttonlabel;" tooltiptext="&profile.dblist.buttonlabel;" oncommand="SQLiteManager.openSelectedDatabase('listbox-profileDB')" />
- <toolbarseparator/>
- </toolbar>
-
- <toolbar id="sm-toolbar-debug" hidden="true">
- <toolbarbutton id="tbb_aboutConfig" command="smc-aboutconfig"/>
- <toolbarbutton id="tbb_console" command="smc-console"/>
- <toolbarbutton id="tbb_dominspector" command="smc-dominspector" hidden="true"/>
- <toolbarseparator/>
- </toolbar>
-
- <!-- required to let the toolbar occupy the whole width flex=1 is necessary. -->
- <toolbar id="sm-toolbar-spacer" flex="1"/>
- </hbox>
- </toolbox>
-
- <hbox flex="1">
- <vbox id="sidebar-left" flex="1" persist="width">
- <menulist id="ml-dbNames" style="font-weight: bold; color: blue; padding: 3px 3px;" context="mp-detachDb" oncommand="SQLiteManager.changeAttachedDb();"/>
- <tree id="t-dbStructNorm" flex="1" hidecolumnpicker="true" seltype="single" selstyle="primary" onselect="SQLiteManager.getDbObjectInfo()">
- <treecols>
- <!-- primary=true required to put +/- sign for hierarchical tree -->
- <treecol id="col-dbStructNorm" hideheader="true" primary="true" flex="1"/>
- </treecols>
- <treechildren id="tc-dbStructNorm" context="mp-dbstructure"/>
- </tree>
- </vbox>
-
- <splitter id="localsplitter" persist="state" collapse="before">
- <grippy/>
- </splitter>
-
- <vbox flex="1" persist="width">
- <tabbox id="sm-tabbox" flex="1">
- <tabs id="sm-tabs" onselect="SQLiteManager.loadTabWithId(this.selectedItem.id)" closebutton="false" onclosetab="SQLiteManager.closeTab()">
- <tab id="tab-structure" linkedpanel="structureTab" label="&tab.structure;" persist="selected"/>
- <tab id="tab-browse" linkedpanel="browseTab" label="&tab.browse;" persist="selected"/>
- <tab id="tab-execute" linkedpanel="executeTab" label="&tab.execute;" persist="selected"/>
- <tab id="tab-dbinfo" linkedpanel="dbInfoTab" label="&tab.dbinfo;" persist="selected"/>
- <tab id="tab-exim" linkedpanel="eximTabpanel" collapsed="true"/>
- <tab id="tab-udf" linkedpanel="udfTabpanel" label="&tab.udf;" collapsed="true"/>
- </tabs>
-
- <tabpanels id="sm-tabpanels" flex="1">
- <tabpanel id="structureTab" flex="1">
- <vbox id="vb-structureTab" flex="1">
- <groupbox>
- <caption id="cap-object-info"/>
- <deck id="d-master-ops" hidden="true">
- <hbox id="gb-master-ops-master">
- <button label="&export;" command="smc-exportTable"/>
- </hbox>
- <hbox id="gb-master-ops-table">
- <button label="&drop;" command="smc-dropTable"/>
- <button label="∅" command="smc-emptyTable"/>
- <button label="&rename;" command="smc-renameTable"/>
- <button label="&reindex;" command="smc-reindexTable"/>
- <button label="©" command="smc-copyTable"/>
- <button label="&export;" command="smc-exportTable"/>
- <button label="FK" id="btn-foreign-key" oncommand="SQLiteManager.generateFKTriggers()"/>
- </hbox>
- <hbox id="gb-master-ops-view">
- <button label="&drop;" command="smc-dropView"/>
- <button label="&rename;" command="smc-renameView"/>
- <button label="&modify;" command="smc-modifyView"/>
- <button label="&export;" command="smc-exportView"/>
- </hbox>
- <hbox id="gb-master-ops-index">
- <button label="&drop;" command="smc-dropIndex"/>
- <button label="&reindex;" command="smc-reindexIndex"/>
- </hbox>
- <hbox id="gb-master-ops-trigger">
- <button label="&drop;" command="smc-dropTrigger"/>
- <button label="&rename;" command="smc-renameTrigger"/>
- </hbox>
- </deck>
- </groupbox>
- <vbox flex="1" style="overflow:auto">
- <groupbox id="gb-master-info" hidden="true">
- <caption label="&masterinfo.sql;"/>
- <description id="desc-sql" style="white-space: pre-wrap;" tooltiptext="Double-click to copy the SQL statement" ondblclick="SQLiteManager.copyText(this.textContent);" hidden="true"/>
- <textbox id="str-sql" multiline="true" rows="1" align="stretch" style="overflow: auto" readonly="true"/>
- </groupbox>
- <deck id="d-more-info" hidden="true">
- <vbox id="gb-more-info-table" flex="1">
- <groupbox>
- <caption label="&moreInfo;"/>
-
- <hbox>
- <label class="forControl" value="&numRecords;:"/>
- <textbox id="numRecords" style="width: 8ex" readonly="true"/>
- <label class="forControl" value="&numIndexes;:"/>
- <textbox id="numIndexes" style="width: 8ex" readonly="true"/>
- <label class="forControl" value="&numTriggers;:"/>
- <textbox id="numTriggers" style="width: 8ex" readonly="true"/>
- </hbox>
- </groupbox>
- <groupbox id="gb-editColumn" hidden="true">
- <caption label="&menu.editColumn;"/>
- <grid>
- <columns>
- <column style="padding: 1px 5px; width: 100px;"/>
- <column style="padding: 1px 5px; width: 200px;"/>
- <column style="padding: 1px 5px; width: 200px;"/>
- <column style="padding: 1px 5px; width: 200px;"/>
- </columns>
- <rows>
- <row align="center">
- <text value=""/>
- <text value="Column Name"/>
- <text value="Column Type"/>
- <text value="Default Value"/>
- </row>
- <row align="center">
- <text value="Old values"/>
- <textbox id="tb-ec-oldName" readonly="true"/>
- <textbox id="tb-ec-oldType" readonly="true"/>
- <textbox id="tb-ec-oldDefault" readonly="true"/>
- </row>
- <row align="center">
- <text value="New values"/>
- <textbox id="tb-ec-newName"/>
- <textbox id="tb-ec-newType"/>
- <textbox id="tb-ec-newDefault"/>
- </row>
- <row align="center">
- <text value=""/>
- <text value=""/>
- <hbox>
- <text id="tb-ec-table" hidden="true"/>
- <button label="Cancel" oncommand="SQLiteManager.cancelEditColumn()"/>
- <button label="Change" oncommand="SQLiteManager.alterColumn()"/>
- </hbox>
- <text value=""/>
- </row>
- </rows>
- </grid>
- </groupbox>
- <groupbox>
- <caption id="capColumns" labelPrefix="&Columns;"/>
- <tree id="treeTabCols" rows="6" seltype="single" smTableName="" onselect="">
- <treecols>
- <treecol id="cCid" label="Column ID" flex="1" persist="width"/>
- <splitter class="tree-splitter"/>
- <treecol id="cName" label="Name" flex="1" persist="width"/>
- <splitter class="tree-splitter"/>
- <treecol id="cType" label="Type" flex="1" persist="width"/>
- <splitter class="tree-splitter"/>
- <treecol id="cNotnull" label="Not Null" flex="1" persist="width"/>
- <splitter class="tree-splitter"/>
- <treecol id="cDflt_value" label="Default Value" flex="1" persist="width"/>
- <splitter class="tree-splitter"/>
- <treecol id="cPk" label="Primary Key" flex="1" persist="width"/>
- </treecols>
- <treechildren id="smTableColumns" context="mp-opTableColumn">
- </treechildren>
- </tree>
- <vbox id="hb-addcol">
- <hbox>
- <label style="width:24ex;" value="&name;"/>
- <label style="width:15ex;" value="&type;"/>
- <label style="width:6ex;" value="¬Null;"/>
- <label style="width:10ex;" value="&default;"/>
- </hbox>
- <hbox>
- <textbox id="tb-addcol-name" style="width:24ex"/>
- <menulist id="tb-addcol-type" style="width:15ex" editable="true" sizetopopup="none">
- <menupopup>
- <menuitem label="" selected="true"/>
- <menuitem label="INTEGER" />
- <menuitem label="BOOL" />
- <menuitem label="REAL" />
- <menuitem label="DOUBLE" />
- <menuitem label="FLOAT" />
- <menuitem label="CHAR" />
- <menuitem label="TEXT" />
- <menuitem label="VARCHAR" />
- <menuitem label="BLOB" />
- <menuitem label="NUMERIC" />
- <menuitem label="DATETIME" />
- </menupopup>
- </menulist>
- <checkbox id="tb-addcol-notnull" style="width:7ex" value=""/>
- <textbox id="tb-addcol-default" style="width:10ex"/>
- <button id="btn-addcol" label="&btn.addcol;" oncommand="SQLiteManager.operateOnTable('addColumn')"/>
- </hbox>
- </vbox>
- </groupbox>
- </vbox>
- <groupbox id="gb-more-info-view"/>
- <vbox id="gb-more-info-index">
- <groupbox>
- <caption label="&indexProp;"/>
-
- <hbox>
- <label class="forControl" value="&indexedTable;:"/>
- <textbox id="tabletoindex" style="width: 25ex" readonly="true"/>
- <label class="forControl" value="&indexDuplicate;:"/>
- <textbox id="duplicatevalues" style="width: 25ex" readonly="true"/>
- </hbox>
- </groupbox>
- <groupbox>
- <caption label="&indexedFields;"/>
- <tree id="treeIdxCols" rows="4" seltype="single">
- <treecols>
- <treecol id="ciSeqno" label="Seq. No." flex="1" persist="width"/>
- <splitter class="tree-splitter"/>
- <treecol id="ciCid" label="Column ID" flex="1" persist="width"/>
- <splitter class="tree-splitter"/>
- <treecol id="ciName" label="Name" flex="1" persist="width"/>
- </treecols>
- <treechildren id="smIndexColumns">
- </treechildren>
- </tree>
- </groupbox>
- </vbox>
- <groupbox id="gb-more-info-trigger"/>
- </deck>
- </vbox>
- </vbox>
- </tabpanel>
- <tabpanel id="browseTab" flex="1">
- <vbox id="vb-browseTab" flex="1">
- <hbox align="center" id="optionbar" style="min-height: 1.4em">
- <label id="browse-type" accesskey="" value="" persist="value"/>
- <textbox id="browse-name" value="" persist="value" readonly="true" width="80"/>
- <button id="btnSearch" command="smc-search"/>
- <button id="btnShowAll" command="smc-showAll"/>
- <spacer flex="1"/>
- <button id="btnAddRecord" label="&btn.addrecord;" tooltiptext="&btn.addrecord;" accesskey="&btn.addrecord.ak;" oncommand="SQLiteManager.operateOnTable('insert')"/>
- <button id="btnAddDupRecord" label="&menu.duplicateRecord;" tooltiptext="&menu.duplicateRecord;" accesskey="&menu.duplicateRecord.ak;" oncommand="SQLiteManager.operateOnTable('duplicate')"/>
- <button id="btnEditRecord" label="&menu.editSelected;" tooltiptext="&menu.editSelected;" accesskey="&menu.editSelected.ak;" oncommand="SQLiteManager.operateOnTable('update')" />
- <button id="btnDeleteRecord" label="&menu.deleteSelected;" tooltiptext="&menu.deleteSelected;" accesskey="&menu.deleteSelected.ak;" oncommand="SQLiteManager.operateOnTable('delete')" />
- </hbox>
- <!-- trial for sliding forms -->
- <vbox flex="1">
- <vbox id="box-rowedit" flex="1" hidden="true" style="overflow: auto"/>
- <tree id="browse-tree" style="min-height:20em" editable="true" flex="1" seltype="multiple" enableColumnDrag="false">
- <treecols hidden="true"/>
- <treechildren id="browse-treechildren" editable="true" hidden="true" flex="1" context="mp-editTableRow" onclick="treeBrowse.UserTreeClick(event)"/>
- </tree>
- </vbox>
- <hbox id="browse-navigate">
- <button id="btn-nav-first" label="<<" tooltiptext="&first;" oncommand="SQLiteManager.onBrowseNavigate('first')"/>
- <button id="btn-nav-previous" label="<" tooltiptext="&previous;" oncommand="SQLiteManager.onBrowseNavigate('previous')"/>
- <label id="nav-start-val" style="padding-top:5px;font-weight:bold;"/>
- <!--
- <textbox id="nav-start-val" style="width:50px"/>
- -->
- <label value="&to;" style="padding-top:5px"/>
- <label id="nav-end-val" style="padding-top:5px;font-weight:bold;"/>
- <!--
- <textbox id="nav-end-val" style="width:50px"/>
- -->
- <label value="&of;" style="padding-top:5px"/>
- <label id="nav-total-val" style="padding-top:5px;font-weight:bold;"/>
- <!--
- <textbox id="nav-total-val" readonly="true" style="width:50px"/>
- -->
- <button id="btn-nav-next" label=">" tooltiptext="&next;" oncommand="SQLiteManager.onBrowseNavigate('next')"/>
- <button id="btn-nav-last" label=">>" tooltiptext="&last;" oncommand="SQLiteManager.onBrowseNavigate('last')"/>
- </hbox>
- </vbox>
- </tabpanel>
-
- <tabpanel id="executeTab" flex="1">
- <vbox id="vb-executeTab" flex="1">
- <hbox>
- <label style="font-size:10pt;" value="&string.enterSql;" accesskey="&string.enterSql.ak;" control="txtSqlStatement"/>
- <hbox id="hb-queryHistory">
- <image id="queryHistoryPrevImage" hidden="true" tooltiptext="&btn.prevSql;" onclick="SQLiteManager.showPrevSql()"/>
- <image id="queryHistoryNextImage" hidden="true" tooltiptext="&btn.nextSql;" onclick="SQLiteManager.showNextSql()"/>
- <image id="querySaveByNameImage" hidden="true" tooltiptext="&btn.saveQuery;" onclick="SQLiteManager.saveSqlByName()"/>
- <image id="queryHistoryClearImage" hidden="true" tooltiptext="&btn.clearHistory;" onclick="SQLiteManager.clearSqlHistory()"/>
- </hbox>
-
- <spacer flex="1"/>
- <toolbox id="tb-sql-helper">
- <!-- comes from menuSqlHelper.xul overlay -->
- <menubar id="sql-help-menubar"/>
- </toolbox>
- </hbox>
-
- <vbox style="min-height:5em">
- <textbox id="txtSqlStatement" multiline="true" rows="2" flex="1" value="SELECT * FROM tablename" />
-
- <hbox flex="0">
- <menulist id="listbox-queries" hidden="true" style="max-width: 25ex" sizetopopup="always" oncommand="SQLiteManager.onSelectQuery();">
- <menupopup/>
- </menulist>
- <button id="buttonRun" command="smc-runQuery" label="&btn.runsql;" accesskey="&btn.runsql.ak;" tooltiptext="&btn.runsql.tooltiptext;"/>
- <!--
- <button id="buttonRun" label="&buttonRun;" accesskey="&buttonRun.ak;" oncommand="SQLiteManager.runSqlStatement('select')" />
- <button id="buttonExecute" label="&buttonExecute;" accesskey="&buttonExecute.ak;" oncommand="SQLiteManager.runSqlStatement('execute')" />
- -->
- <label class="forControl" value="&label.sqlLastError;:"/>
- <textbox id="sqlLastError" readonly="true" flex="1"/>
- </hbox>
- </vbox>
- <splitter id="executetabsplitter" persist="state" collapse="before"/>
-
- <hbox flex="1">
- <tree align="stretch" id="treeSqlOutput" style="min-height:10em" enableColumnDrag="true" seltype="multiple" flex="1">
- <treecols hidden="true"/>
- <treechildren hidden="true" flex="1" onclick="treeExecute.UserTreeClick(event)" context="mp-copy"/>
- </tree>
- </hbox>
- </vbox>
- </tabpanel>
-
- <tabpanel id="dbInfoTab"/>
- <tabpanel id="eximTabpanel"/>
- <tabpanel id="udfTabpanel"/>
- </tabpanels>
- </tabbox>
- </vbox>
- </hbox>
- </vbox>
-
- <statusbar id="sbFull">
- <statusbarpanel id="sbSqliteVersion" style="font-weight:bold"/>
- <statusbarpanel id="sbGeckoVersion"/>
- <statusbarpanel id="sbExtVersion" style="color:#666666"/>
- <statusbarpanel id="sbSharedMode" label="---" style="font-weight:bold;"/>
- <statusbarpanel id="sbPanel-display" flex="1"/>
- <statusbarpanel id="sbQueryTime"/>
- </statusbar>
-
- <!-- for cloning; hidden=true otherwise awkward space at the bottom-->
- <menuitem id="mi-mru" crop="center" oncommand="SQLiteManager.openDatabaseWithPath(this.label)" hidden="true"/>
- </window>
-